export default function deepClone(obj) {
    // 判断是否为对象, 不是对象直接返回
    if (typeof obj !== 'object' || obj === null) {
      return obj
    }
    const res = {}
    for (let key in obj) {
      if (typeof obj[key] === 'object') {
        res[key] = deepClone(obj[key])
      } else {
        res[key] = obj[key]
      }
    }
    return res
  }